﻿@model IEnumerable<HotelManageSystem.Models.MinimumstockModel>
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutWarehouseInstall.cshtml";
}
@section Head
{
    <link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css"></link>
}
@{
    Html.Telerik()
        .Grid(Model)
        .Name("Min")
        .DataKeys(keys => keys.Add(x => x.ID))
        .ToolBar(commands => commands.Insert())
        .DataBinding(dataBinding=>dataBinding.Ajax()
                               .Insert("Insert", "Minimumstock")
                               .Select("SelectAjax", "Minimumstock")
                               .Update("Update", "Minimumstock")
                               .Delete("Delete", "Minimumstock"))
        .Pageable()
        .Sortable()
        .Columns(columns =>
                     {
                         columns.Bound(x => x.Productname).Title("货品名");
                         columns.Bound(x => x.Minimumstock).Title("最低库存");
                         columns.Command(commands =>
                                             {
                                                 commands.Edit();
                                                 commands.Delete();
                                             });

                     })
         .Editable(editing=>editing.Mode(GridEditMode.PopUp))
        .Scrollable()
        .Groupable()
        .Filterable()
        .Render();
    
}

